<template>
    <div>
        <div>
            <label>用户名:</label>
            <input type="text" v-model="user.username">
        </div>
        <div>
            <label>密码</label>
            <input type="text" v-model="user.password">
        </div>
        <div>
            <button @click="login">登录</button>
        </div>
    </div>
</template>

<script>
export default {
    data(){
        return{
            user:{
                username:'mrbird',
                password:'1234qwer'
            }
        }
    },
    methods:{
        async login(){
            console.log(this.user);
            let result=await this.$api.users.login(this.user)
            console.log(result);
        }
    }
}
</script>

<style>

</style>